package com.woniuxy01;

import java.util.ArrayList;
import java.util.List;
import java.util.Random;

public class Test03 {
    public static void main(String[] args) {
        List<Integer> list = new ArrayList<Integer>();
        Random random = new Random();
        int num;
        int count = 0;
        while (count<10) {
            num = random.nextInt(15);
            if (!list.contains(num)) {
                list.add(num);
                count++;
            }
        }
        System.out.println(list);
        System.out.println(list.size());
    }
}
